1. Field of Invention
The present invention relates to the field of internet information appliances and more particularly to a method and apparatus for running a platform independent virtual keyboard on such an appliance.
2. Description of the Related Prior Art
In a typical desktop computer configuration there exists a physical keyboard for inputting data to the various applications which are running. However, as computing devices have reduced in size, alternate means have been developed for inputting data. For example, multi-function cellular phones rely on the keypad to allow a user to input data. The entry of alpha characters is somewhat awkward as there are generally three letters associated with each key on the keypad, since the keypad is designed primarily for numeric entry. In order to streamline data input, virtual keyboards have been developed. A pictorial image of a keyboard appears on the screen of the information appliance in use, allowing input to the data fields associated with the underlying application. The display screen is generally touch sensitive, so that the user, using their finger or a wand can enter a desired character string. One of the problems with present day virtual keyboards is that they have been implemented at the system level using platform-dependent means e.g. 3Com""s PalmPilot(trademark) is a native-level feature that will only work under the PalmOS operating system running on the Motorolla Dragonball platform as shown in FIG. 1. There are several applications such as e-mail, address book and a date book which run on this platform and which can receive input from the virtual keyboard. However, if there were any new applications which a user desired to run, they would have to be written specifically with this configuration in mind. Otherwise, the virtual keyboard would be inoperative with respect to these applications. In operation, the virtual keyboard associates itself with the applications which are open through the operating system running on the information appliance. The inability for the virtual keyboard to function under any other operating system limits the universality of information appliance, making it ultimately undesirable.
In an attempt to move away from a dependency on a particular hardware and operating system configuration, the Java(trademark) programming language was developed. Java(trademark) allows applications to be run on any hardware platform without having to be rewritten or recompiled by the programmer for each separate platform. Further, Java(trademark) can be used to create complete applications that may run on a single computer or be distributed among servers and clients in a network such as the Internet. The programs created using Java(trademark) are portable in a network meaning that once the program is compiled into Java(trademark) bytecode it can be run anywhere in a network on a server or client that has a Java(trademark) interpreter or Java(trademark) virtual machine (JVM). The JVM is an abstract computer (i.e. actually a software layer) that provides an interface between compiled Java(trademark) binary code and the hardware platform which actually performs the programs instructions. Once a JVM has been provided for a platform, any Java(trademark) program can run on the platform. Diagrammatically, this can be described as shown in FIG. 2.
Java(trademark) is an object-oriented programming language which means, among other characteristics, that similar objects can take advantage of being part of the same class and inherit common code. An object is what is actually run in the computer. It contains programming code (sequences of computer instructions) and data (information which the instructions operate on). All communication to an object is done via messages which define the interface to the object i.e. the internal data and code of the object cannot be accessed directly. An object is defined by its class, with a class being a template definition of the methods and variables in a particular kind of object. Objects are individual instances of a class, containing real values instead of variables. Each object is made into a generic class of objects and even more generic classes are defined so that objects can share models and reuse the class definitions in their code. Variables are data types which are not assigned a constant value, while a method is the action or programmed procedure that a message carries out. A method is defined as part of a class and included in any object of that class.
In Java(trademark) programming, there are application programs and compact programs called applets. An application program is a program designed to perform a specific function directly for the user or, in some cases, for another application program (e.g. word processors, Web browsers, etc.). Applications use the services of the computer""s operating system and other supporting applications. On the other hand, an applet is a small program that can be sent along with a Web page to a user. Java(trademark) applets can perform interactive animations, immediate calculations, or other simple tasks without having to send a user request back to the server. Web browsers that support Java(trademark) are able to download the applet to the user""s hardware and then execute it i.e. the executable software is downloaded when you need it and then discarded when the program has been executed.
Practically speaking, the major software manufactures have built a JVM into their operating systems and/or Web browsers to allow Java(trademark) applications or applets to run e.g. a Windows(trademark) machine will have a Java(trademark) interpreter for the Windows/Intel/IBM environment, a Mac(trademark) will have a Mac-Java interpreter, etc. An example of such software would be the web browser NETSCAPE(trademark).
Presently, when a user desires to use multiple Java(trademark) applications they must invoke separate Java(trademark) interpreters. As shown in FIG. 3, in the traditional model each Java(trademark) application has its own associated JVM which must be run (instantiated) as a system process to run the application with which it is associated. This is considered inefficient because the applications must share the same memory and other resources of the information appliance in which they are operating. Further, each application runs independent of the other, so that any virtual keyboard which is generated to allow data input to a particular Java(trademark) application, can only be used with the associated Java(trademark) application.
The present invention seeks to overcome the disadvantages of the prior art by providing an embedded desktop which can run multiple applications simultaneously under one instance of a JVM and which provides a virtual keyboard which, allows data input to any open Java(trademark) application or component within an application without modifying the behavior of the application or component.
In accordance with one aspect of the present invention there is provided a computer implemented method of operating a platform independent virtual keyboard allowing input to a plurality of open Java(trademark) applications running under one instance of a Java(trademark) Virtual Machine comprising the steps of: launching an embedded desktop comprising a core and at least a service vendor plug-in and a user interface plug-in, wherein the embedded desktop communicates with the plurality of open Java(trademark) applications and the Java(trademark) Virtual Machine; generating input means for presentation on a touch sensitive display screen and presenting the user interface of the open Java(trademark) applications to the touch sensitive display screen; invoking a virtual keyboard manager which communicates with the virtual keyboard and the embedded desktop; adding the virtual keyboard manager as a focus listener to all active components and as a container listener to all active containers; upon selection of a first component by a user, updating the virtual keyboard manager with a focus gained event; referencing the virtual keyboard to the selected first component; communicating a simulated key event to the referenced component for each key on the virtual keyboard selected by a user; upon selection of a second component by the user, updating the virtual keyboard manager with a focus lost event associated with the first component and updating the virtual keyboard manager with a focus gained event associated with the second component; referencing the virtual keyboard to the selected second component; upon the removal of a container or its children, updating said virtual keyboard manager; and upon the addition of a container or its children, updating said virtual keyboard manger.
In another aspect of the present invention there is provided in a computer comprising storage means, a central processing unit, an operating system, a Java(trademark) Virtual Machine, an embedded desktop running a plurality of Java(trademark) applications under one instance of a Java(trademark) Virtual Machine, the embedded desktop stored in the storage means and comprising at least a core, a service vendor plug-in and a user interface plug-in, a virtual keyboard comprising: input means; and a virtual keyboard manager communicating with the input means; wherein the embedded desktop communicates with the plurality of Java(trademark) applications and the Java(trademark) Virtual Machine; and wherein the input means and the user interface of the Java(trademark) applications is presented to a touch sensitive display screen when the embedded desktop and the plurality of Java(trademark) applications are opened; and wherein the virtual keyboard manager is added as a focus listener to all active components and as a container listener to all active containers; and wherein the virtual keyboard manager is updated with a focus gained event upon selection of a first component by a user; and wherein the virtual keyboard is referenced to the selected first component; and wherein a simulated key event is communicated to the referenced component for each key on the virtual keyboard selected by a user; and wherein the virtual keyboard manager is updated with a focus lost event associated with the first component and the virtual keyboard manager is updated with a focus gained event associated with the second component; and wherein the virtual keyboard is referenced to the selected second component; and wherein said virtual keyboard manager is updated upon removal of a container or its children; and wherein said virtual keyboard manager is updated upon addition of a container or its children.
In yet another aspect of the present invention there is provided a computer-readable medium having stored thereon, computer-executable instructions which, when executed by a processor, cause the processor to perform the steps of: launching an embedded desktop comprising a core and at least a service vendor plug-in and a user interface plug-in, wherein the embedded desktop communicates with a plurality of open Java(trademark) applications and a Java(trademark) Virtual Machine; generating a virtual keyboard for presentation on a touch sensitive display screen and presenting the user interface of the open Java(trademark) applications to the touch sensitive display screen; invoking a virtual keyboard manager which communicates with the virtual keyboard; adding the virtual keyboard manager as a focus listener to all active components and as a container listener to all active containers; upon selection of a first component by a user, updating the virtual keyboard manager with a focus gained event; referencing the virtual keyboard to the selected first component; communicating a simulated key event to the referenced component for each key on said virtual keyboard selected by a user; upon selection of a second component by the user, updating the virtual keyboard manager with a focus lost event associated with the first component and updating the virtual keyboard manager with a focus gained event associated with the second component; referencing the virtual keyboard to the selected second component; updating said virtual keyboard manager upon the removal of a container; and updating said virtual keyboard manager upon the addition of a container.